package com.yantu.mapper;

import com.yantu.bean.ClassPaper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 综合实训课程设计
 * @since 2022-08-13
 */
public interface ClassPaperMapper extends BaseMapper<ClassPaper> {
    //根据学生id获取学生拥有的试卷id
    @Select("select cp.paper_id * from class_paper cp,class_student cs where cs.user_id=#{id} AND cp.class_id=cs.class_id")
    List<Integer> getAllClassPaperById(@Param("id") Integer id);

}
